import React from "react";
// 新
import ReactDOM from "react-dom/client";

import "./index.css";

function Parent(props) {
  return (
    <div className="parent">
      <div className="left">{props.left}</div>
      <div className="right">{props.right}</div>
    </div>
  );
}
function Left() {
  return <div>左边</div>;
}
function Right() {
  return <div>右边</div>;
}
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<Parent left={<Left />} right={<Right />}></Parent>);
